<?php


namespace app\validate;

use think\Validate;

class Check extends Validate
{

    protected $rule = [
        'mobile' => 'require',
        'code' => 'require',
        'username'=>'require',
        'id_card'=>'require',
        'email'=>'require',
        'user_id' => 'require',
        'lat' => 'require',
        'lng' => 'require',
        'openid' => 'require',
        'money' => 'require',
    ];

    protected $message = [
        'user_id.require' => '用户id不能为空',
        'mobile.require' => '手机号码不能为空',
        'username.require' => '真实姓名不能为空',
        'id_card.require' => '身份证号码不能为空',
        'email.require' => '邮箱不能为空',
        'code.require'=>'验证码不能为空',
        'lat.require'=>'纬度不能为空',
        'lng.require'=>'经度不能为空',
        'openid.require'=>'openid不能为空',
        'money.require'=>'金额不能为空'
    ];

    protected $scene = [
        'user_info' => ['user_id'],
        'my_collect' => ['user_id'],
        'mobile_check' => ['mobile'],
        'mobile_register' => ['mobile','username','id_card'],
        'login_check' => ['mobile','code'],
        'wx_login_check' => ['openid'],
        'map_station' => [],
        'charge' => ['user_id','money']
    ];
}